#include <cgic.h>

// cgiFormString获取数据
// 可以获取get参数也可以获取post参数
int cgiMain(){

    char nameStr[128];
    char pwdStr[128];
    cgiFormString("name",nameStr,128);
    cgiFormString("pwd",pwdStr,128);

    cgiHeaderContentType("text/html");
    fprintf(cgiOut, "<HTML><HEAD> <meta charset=\"UTF-8\"> \n");
    fprintf(cgiOut, "<TITLE>cgic测试</TITLE></HEAD>\n");
    fprintf(cgiOut, "<BODY><H1>这是cgic测试页面,获取数据为:name=%s,pwd=%s</H1>\n",nameStr,pwdStr); 
    fprintf(cgiOut,"</BODY></HTML>");
    return 0;
}